/*----------------------------------------------------------------------*
 *	CLASS:		Qt3Round
 *	Quantum Tic Tac Toe
 *	Copyright (c) 2004-2009 Novatia Labs, Inc.  All rights reserved.
 *----------------------------------------------------------------------*/

package com.novatialabs.qttt.engine.impl;

/**
 * Round keeps track of the set of steps in a round.
 * This consists of both a move and a resolution.
 *
 * @Author	Duane Gibson
 * @Author Friendly development resources cheerfully provided by Charles Phares.
 * @Author	$Author$
 * @Version	$Revision$
 */

/*package*/ final class Qt3Round
{

   /**
    * The move number (in the range 1 to 9).
    */
    private final int		moveNumber;	// 1 to 9.

   /**
    * The move.
    */
    private final Qt3Move	move;

   /**
    * The resolution.
    */
    private final Qt3Resolution	resolution;


   /*-------------------------------------------------------------------*
    *	CONSTRUCTOR:	Qt3Round()
    *	AUTHOR:		Duane Gibson
    *	CREATION DATE:	Mon Jan  3 19:32:18 PST 2005
    *-------------------------------------------------------------------*/
   /**
    * Disabled zero-arg constructor.
    */

    protected Qt3Round()
    {
	throw new IllegalStateException();
    } // Qt3Round()

   /*-------------------------------------------------------------------*
    *	CONSTRUCTOR:	Qt3Round()
    *	AUTHOR:		Duane Gibson
    *	CREATION DATE:	Mon Jan  3 19:32:29 PST 2005
    *-------------------------------------------------------------------*/
   /**
    * Constructs a round.
    */

    /*package*/ Qt3Round(
	int		moveNum,
	Qt3Step		prevStep
	)
    {

	this.moveNumber = moveNum;

	this.move = new Qt3Move(moveNum, prevStep);
	this.resolution = new Qt3Resolution(moveNum, this.move);

	this.clear();

    } // Qt3Round()

   /*-------------------------------------------------------------------*
    *	METHOD:		clear()
    *	AUTHOR:		Duane Gibson
    *	CREATION DATE:	Mon Jan  3 19:33:44 PST 2005
    *-------------------------------------------------------------------*/
   /**
    * Clears this round object to an initial state.
    */

    private void clear()
    {
	this.move.clear();
	this.resolution.clear();
    }  // clear()


   /*-------------------------------------------------------------------*
    *	METHOD:		getMoveNumber()
    *	AUTHOR:		Duane Gibson
    *	CREATION DATE:	Mon Jan  3 19:34:42 PST 2005
    *-------------------------------------------------------------------*/
   /**
    * Returns number of this move (in the range 1 to 9).
    */

    public int getMoveNumber() {
	return this.moveNumber;
    } // getMoveNumber()

   /*-------------------------------------------------------------------*
    *	METHOD:		getMove()
    *	AUTHOR:		Duane Gibson
    *	CREATION DATE:	Mon Jan  3 19:44:55 PST 2005
    *-------------------------------------------------------------------*/
   /**
    * Returns the move in this round.
    */

    public Qt3Move getMove() {
	return this.move;
    } // getMove()

   /*-------------------------------------------------------------------*
    *	METHOD:		getResolution()
    *	AUTHOR:		Duane Gibson
    *	CREATION DATE:	Mon Jan  3 19:45:35 PST 2005
    *-------------------------------------------------------------------*/
   /**
    * Returns the resolution in this round.
    */

    public Qt3Resolution getResolution() {
	return this.resolution;
    } // getResolution()

} // class Qt3Round

